package com.gongzhiyun.springboot3test.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gongzhiyun.springboot3test.entity.user.TbUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface TbUserMapper extends BaseMapper<TbUser> {
    @Select("select * from gongzhiyun_123.tb_user where deleted='y' and username=#{username}")
    TbUser IsDel(String username);

    @Select("select * from gongzhiyun_123.tb_user where deleted='y' and uid=#{uid}")
    TbUser IsDel(Integer uid);

    @Update("update tb_user set deleted='n' where uid=#{uid}")
    Integer restoreUser(Integer uid);
}
